home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / AppleTalk.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  30.1 KB  |  565 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Sunday, January 6, 1991 at 10:20 PM
  3.     AppleTalk.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.         Copyright Apple Computer, Inc. 1985-1990
  7.         All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT AppleTalk;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingAppleTalk}
  21. {$SETC UsingAppleTalk := 1}
  22.  
  23. {$I+}
  24. {$SETC AppleTalkIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingOSUtils}
  30. {$I $$Shell(PInterfaces)OSUtils.p}
  31. {$ENDC}
  32. {$SETC UsingIncludes := AppleTalkIncludes}
  33.  
  34. CONST
  35.  
  36. {    Driver unit and reference numbers (ADSP is dynamic)}
  37.  
  38. mppUnitNum = 9;                                                 {MPP unit number}
  39. atpUnitNum = 10;                                                { ATP unit number }
  40. xppUnitNum = 40;                                                { XPP unit number }
  41. mppRefNum = -10;                                                {MPP reference number }
  42. atpRefNum = -11;                                                { ATP reference number }
  43. xppRefNum = -41;                                                { XPP reference number }
  44.  
  45. {    .MPP csCodes}
  46.  
  47. lookupReply = 242;                                              { This command queued to ourself }
  48. writeLAP = 243;                                                 { Write out LAP packet }
  49. detachPH = 244;                                                 { Detach LAP protocol handler }
  50. attachPH = 245;                                                 { Attach LAP protocol handler }
  51. writeDDP = 246;                                                 { Write out DDP packet }
  52. closeSkt = 247;                                                 { Close DDP socket }
  53. openSkt = 248;                                                  { Open DDP socket }
  54. loadNBP = 249;                                                  { Load NBP command-executing code }
  55. lastResident = 249;                                             { Last resident command }
  56. confirmName = 250;                                              { Confirm name }
  57. lookupName = 251;                                               { Look up name on internet }
  58. removeName = 252;                                               { Remove name from Names Table }
  59. registerName = 253;                                             { Register name in Names Table }
  60. killNBP = 254;                                                  { Kill outstanding NBP request }
  61. unloadNBP = 255;                                                { Unload NBP command code }
  62. setSelfSend = 256;                                              { MPP: Set to allow writes to self }
  63. SetMyZone = 257;                                                { Set my zone name }
  64. GetATalkInfo = 258;                                             { get AppleTalk information }
  65. ATalkClosePrep = 259;                                           { AppleTalk close query }
  66.  
  67. {    .ATP csCodes}
  68.  
  69. nSendRequest = 248;                                             { NSendRequest code }
  70. relRspCB = 249;                                                 { Release RspCB }
  71. closeATPSkt = 250;                                              { Close ATP socket }
  72. addResponse = 251;                                              { Add response code | Require open skt }
  73. sendResponse = 252;                                             { Send response code }
  74. getRequest = 253;                                               { Get request code }
  75. openATPSkt = 254;                                               { Open ATP socket }
  76. sendRequest = 255;                                              { Send request code }
  77. relTCB = 256;                                                   { Release TCB }
  78. killGetReq = 257;                                               { Kill GetRequest }
  79. killSendReq = 258;                                              { Kill SendRequest }
  80. killAllGetReq = 259;                                            { Kill all getRequests for a skt }
  81.  
  82. {    .XPP csCodes}
  83.  
  84. openSess = 255;                                                 { Open session }
  85. closeSess = 254;                                                { Close session }
  86. userCommand = 253;                                              { User command }
  87. userWrite = 252;                                                { User write }
  88. getStatus = 251;                                                { Get status }
  89. afpCall = 250;                                                  { AFP command (buffer has command code) }
  90. getParms = 249;                                                 { Get parameters }
  91. abortOS = 248;                                                  { Abort open session request }
  92. closeAll = 247;                                                 { Close all open sessions }
  93. xCall = 246;                                                    { .XPP extended calls }
  94. ATTransOpen = 0;                                                {AppleTalk has opened}
  95. ATTransClose = 2;                                               {AppleTalk is about to close}
  96. ATTransClosePrep = 3;                                           {Is it OK to close AppleTalk ?}
  97. ATTransCancelClose = 4;                                         {Cancel the ClosePrep transition}
  98. afpByteRangeLock = 1;                                           {AFPCall command codes}
  99. afpVolClose = 2;                                                {AFPCall command codes}
  100. afpDirClose = 3;                                                {AFPCall command codes}
  101. afpForkClose = 4;                                               {AFPCall command codes}
  102. afpCopyFile = 5;                                                {AFPCall command codes}
  103. afpDirCreate = 6;                                               {AFPCall command codes}
  104. afpFileCreate = 7;                                              {AFPCall command codes}
  105. afpDelete = 8;                                                  {AFPCall command codes}
  106. afpEnumerate = 9;                                               {AFPCall command codes}
  107. afpFlush = 10;                                                  {AFPCall command codes}
  108. afpForkFlush = 11;                                              {AFPCall command codes}
  109. afpGetDirParms = 12;                                            {AFPCall command codes}
  110. afpGetFileParms = 13;                                           {AFPCall command codes}
  111. afpGetForkParms = 14;                                           {AFPCall command codes}
  112. afpGetSInfo = 15;                                               {AFPCall command codes}
  113. afpGetSParms = 16;                                              {AFPCall command codes}
  114. afpGetVolParms = 17;                                            {AFPCall command codes}
  115. afpLogin = 18;                                                  {AFPCall command codes}
  116. afpContLogin = 19;                                              {AFPCall command codes}
  117. afpLogout = 20;                                                 {AFPCall command codes}
  118. afpMapID = 21;                                                  {AFPCall command codes}
  119. afpMapName = 22;                                                {AFPCall command codes}
  120. afpMove = 23;                                                   {AFPCall command codes}
  121. afpOpenVol = 24;                                                {AFPCall command codes}
  122. afpOpenDir = 25;                                                {AFPCall command codes}
  123. afpOpenFork = 26;                                               {AFPCall command codes}
  124. afpRead = 27;                                                   {AFPCall command codes}
  125. afpRename = 28;                                                 {AFPCall command codes}
  126. afpSetDirParms = 29;                                            {AFPCall command codes}
  127. afpSetFileParms = 30;                                           {AFPCall command codes}
  128. afpSetForkParms = 31;                                           {AFPCall command codes}
  129. afpSetVolParms = 32;                                            {AFPCall command codes}
  130. afpWrite = 33;                                                  {AFPCall command codes}
  131. afpGetFlDrParms = 34;                                           {AFPCall command codes}
  132. afpSetFlDrParms = 35;                                           {AFPCall command codes}
  133. afpDTOpen = 48;                                                 {AFPCall command codes}
  134. afpDTClose = 49;                                                {AFPCall command codes}
  135. afpGetIcon = 51;                                                {AFPCall command codes}
  136. afpGtIcnInfo = 52;                                              {AFPCall command codes}
  137. afpAddAPPL = 53;                                                {AFPCall command codes}
  138. afpRmvAPPL = 54;                                                {AFPCall command codes}
  139. afpGetAPPL = 55;                                                {AFPCall command codes}
  140. afpAddCmt = 56;                                                 {AFPCall command codes}
  141. afpRmvCmt = 57;                                                 {AFPCall command codes}
  142. afpGetCmt = 58;                                                 {AFPCall command codes}
  143. afpAddIcon = 192;                                               {Special code for ASP Write commands}
  144.  
  145. xppLoadedBit = 5;                                               { XPP bit in PortBUse }
  146. scbMemSize = 192;                                               {Size of memory for SCB }
  147. xppFlagClr = 0;                                                 {Cs for AFPCommandBlock }
  148. xppFlagSet = 128;                                               {StartEndFlag & NewLineFlag fields. }
  149.  
  150. lapSize = 20;
  151. ddpSize = 26;
  152. nbpSize = 26;
  153. atpSize = 56;
  154. atpXOvalue = 32;                                                {ATP exactly-once bit }
  155. atpEOMvalue = 16;                                               {ATP End-Of-Message bit }
  156. atpSTSvalue = 8;                                                {ATP Send-Transmission-Status bit }
  157. atpTIDValidvalue = 2;                                           {ATP trans. ID valid bit }
  158. atpSendChkvalue = 1;                                            {ATP send checksum bit }
  159.  
  160. zipGetLocalZones = 5;
  161. zipGetZoneList = 6;
  162. zipGetMyZone = 7;
  163.  
  164. LAPMgrPtr = $B18;                                               {Entry point for LAP Manager}
  165. LAPMgrCall = 2;                                                 {Offset to LAP routines}
  166. LAddAEQ = 23;                                                   {LAPAddATQ routine selector}
  167. LRmvAEQ = 24;                                                   {LAPRmvATQ routine selector}
  168.  
  169. TYPE
  170. ABCallType = (tLAPRead,tLAPWrite,tDDPRead,tDDPWrite,tNBPLookup,tNBPConfirm,
  171.     tNBPRegister,tATPSndRequest,tATPGetRequest,tATPSdRsp,tATPAddRsp,tATPRequest,
  172.     tATPResponse);
  173.  
  174. ABProtoType = (lapProto,ddpProto,nbpProto,atpProto);
  175.  
  176.  
  177. ABByte=1..127;
  178.  
  179. LAPAdrBlock = PACKED RECORD
  180.     dstNodeID: Byte;
  181.     srcNodeID: Byte;
  182.     lapProtType: ABByte;
  183.     END;
  184.  
  185. ATQEntryPtr = ^ATQEntry;
  186. ATQEntry = RECORD
  187.     qLink: ATQEntryPtr;                                         {next queue entry}
  188.     qType: INTEGER;                                             {queue type}
  189.     CallAddr: ProcPtr;                                          {pointer to your routine}
  190.     END;
  191.  
  192. AddrBlock = PACKED RECORD
  193.     aNet: INTEGER;
  194.     aNode: Byte;
  195.     aSocket: Byte;
  196.     END;
  197.  
  198. EntityPtr = ^EntityName;
  199. EntityName = RECORD
  200.     objStr: Str32;
  201.     typeStr: Str32;
  202.     zoneStr: Str32;
  203.     END;
  204.  
  205. RetransType = PACKED RECORD
  206.     retransInterval: Byte;
  207.     retransCount: Byte;
  208.     END;
  209.  
  210. BDSElement = RECORD
  211.     buffSize: INTEGER;
  212.     buffPtr: Ptr;
  213.     dataSize: INTEGER;
  214.     userBytes: LONGINT;
  215.     END;
  216.  
  217.  
  218. BDSType = ARRAY [0..7] OF BDSElement;
  219. BDSPtr = ^BDSType;
  220. BitMapType = PACKED ARRAY [0..7] OF BOOLEAN;
  221.  
  222. ABRecPtr = ^ABusRecord;
  223. ABRecHandle = ^ABRecPtr;
  224. ABusRecord = RECORD
  225.     abOpcode: ABCallType;
  226.     abResult: INTEGER;
  227.     abUserReference: LONGINT;
  228.     CASE ABProtoType OF
  229.       lapProto:
  230.         (lapAddress: LAPAdrBlock;
  231.         lapReqCount: INTEGER;
  232.         lapActCount: INTEGER;
  233.         lapDataPtr: Ptr);
  234.       ddpProto:
  235.         (ddpType: Byte;
  236.         ddpSocket: Byte;
  237.         ddpAddress: AddrBlock;
  238.         ddpReqCount: INTEGER;
  239.         ddpActCount: INTEGER;
  240.         ddpDataPtr: Ptr;
  241.         ddpNodeID: Byte);
  242.       nbpProto:
  243.         (nbpEntityPtr: EntityPtr;
  244.         nbpBufPtr: Ptr;
  245.         nbpBufSize: INTEGER;
  246.         nbpDataField: INTEGER;
  247.         nbpAddress: AddrBlock;
  248.         nbpRetransmitInfo: RetransType);
  249.       atpProto:
  250.         (atpSocket: Byte;
  251.         atpAddress: AddrBlock;
  252.         atpReqCount: INTEGER;
  253.         atpDataPtr: Ptr;
  254.         atpRspBDSPtr: BDSPtr;
  255.         atpBitmap: BitMapType;
  256.         atpTransID: INTEGER;
  257.         atpActCount: INTEGER;
  258.         atpUserData: LONGINT;
  259.         atpXO: BOOLEAN;
  260.         atpEOM: BOOLEAN;
  261.         atpTimeOut: Byte;
  262.         atpRetries: Byte;
  263.         atpNumBufs: Byte;
  264.         atpNumRsp: Byte;
  265.         atpBDSSize: Byte;
  266.         atpRspUData: LONGINT;
  267.         atpRspBuf: Ptr;
  268.         atpRspSize: INTEGER);
  269.     END;
  270.  
  271. AFPCommandBlock = PACKED RECORD
  272.     cmdByte: Byte;
  273.     startEndFlag: Byte;
  274.     forkRefNum: INTEGER;
  275.     rwOffset: LONGINT;
  276.     reqCount: LONGINT;
  277.     newLineFlag: Byte;
  278.     newLineChar: CHAR;
  279.     END;
  280.  
  281. WDSElement = RECORD
  282.     entryLength: INTEGER;
  283.     entryPtr: Ptr;
  284.     END;
  285.  
  286. NamesTableEntry = RECORD
  287.     qLink: QElemPtr;
  288.     nteAddress: AddrBlock;
  289.     nteData: PACKED ARRAY [1..100] OF CHAR;
  290.     END;
  291.  
  292. MPPParmType = (LAPWriteParm,AttachPHParm,DetachPHParm,OpenSktParm,CloseSktParm,
  293.     WriteDDPParm,OpenATPSktParm,CloseATPSktParm,SendRequestParm,GetRequestParm,
  294.     SendResponseParm,AddResponseParm,RelTCBParm,RelRspCBParm,RegisterNameParm,
  295.     LookupNameParm,ConfirmNameParm,RemoveNameParm,SetSelfSendParm,NSendRequestParm,
  296.     KillSendReqParm,KillGetReqParm,KillNBPParm,GetAppleTalkInfoParm,KillAllGetReqParm,
  297.     ATalkClosePrepParm,CancelATalkClosePrepParm);
  298.  
  299. MPPPBPtr = ^MPPParamBlock;
  300. MPPParamBlock = PACKED RECORD
  301.     qLink: QElemPtr;                                            {next queue entry}
  302.     qType: INTEGER;                                             {queue type}
  303.     ioTrap: INTEGER;                                            {routine trap}
  304.     ioCmdAddr: Ptr;                                             {routine address}
  305.     ioCompletion: ProcPtr;                                      {completion routine}
  306.     ioResult: OSErr;                                            {result code}
  307.     ioNamePtr: StringPtr;                                       {->filename}
  308.     ioVRefNum: INTEGER;                                         {volume reference or drive number}
  309.     ioRefNum: INTEGER;                                          {driver reference number}
  310.     csCode: INTEGER;                                            {call command code AUTOMATICALLY set}
  311.     CASE MPPParmType OF
  312.       LAPWriteParm:
  313.         (filler0: INTEGER;
  314.         wdsPointer: Ptr);                                       {->Write Data Structure}
  315.       AttachPHParm,DetachPHParm:
  316.         (protType: Byte;                                        {ALAP Protocol Type}
  317.         filler1: Byte;
  318.         handler: Ptr);                                          {->protocol handler routine}
  319.       OpenSktParm,CloseSktParm,WriteDDPParm:
  320.         (socket: Byte;                                          {socket number}
  321.         checksumFlag: Byte;                                     {checksum flag}
  322.         listener: Ptr);                                         {->socket listener routine}
  323.       RegisterNameParm,LookupNameParm,ConfirmNameParm,RemoveNameParm:
  324.         (interval: Byte;                                        {retry interval}
  325.         count: Byte;                                            {retry count}
  326.         entityPtr: Ptr;                                         {->names table element or ->entity name}
  327.         CASE MPPParmType OF
  328.           RegisterNameParm:
  329.             (verifyFlag: Byte;                                  {set if verify needed}
  330.             filler3: Byte);
  331.           LookupNameParm:
  332.             (retBuffPtr: Ptr;                                   {->return buffer}
  333.             retBuffSize: INTEGER;                               {return buffer size}
  334.             maxToGet: INTEGER;                                  {matches to get}
  335.             numGotten: INTEGER);                                {matched gotten}
  336.           ConfirmNameParm:
  337.             (confirmAddr: AddrBlock;                            {->entity}
  338.             newSocket: Byte;                                    {socket number}
  339.             filler4: Byte));
  340.       SetSelfSendParm:
  341.         (newSelfFlag: Byte;                                     {self-send toggle flag}
  342.         oldSelfFlag: Byte);                                     {previous self-send state}
  343.       KillNBPParm:
  344.         (nKillQEl: Ptr);                                        {ptr to Q element to cancel}
  345.       GetAppleTalkInfoParm:
  346.         (version: INTEGER;                                      {requested info version}
  347.         varsPtr: Ptr;                                           {pointer to well known MPP vars}
  348.         DCEPtr: Ptr;                                            {pointer to MPP DCE}
  349.         portID: INTEGER;                                        {port number [0..7]}
  350.         configuration: LONGINT;                                 {32-bit configuration word}
  351.         selfSend: INTEGER;                                      {non zero if SelfSend enabled}
  352.         netLo: INTEGER;                                         {low value of network range}
  353.         netHi: INTEGER;                                         {high value of network range}
  354.         ourAddr: LONGINT;                                       {our 24-bit AppleTalk address}
  355.         routerAddr: LONGINT;                                    {24-bit address of (last) router}
  356.         numOfPHs: INTEGER;                                      {max. number of protocol handlers}
  357.         numOfSkts: INTEGER;                                     {max. number of static sockets}
  358.         numNBPEs: INTEGER;                                      {max. concurrent NBP requests}
  359.         nTQueue: Ptr;                                           {pointer to registered name queue}
  360.         LAlength: INTEGER;                                      {length in bytes of data link addr}
  361.         linkAddr: Ptr;                                          {data link address returned}
  362.         zoneName: Ptr);                                         {zone name returned}
  363.       ATalkClosePrepParm:
  364.         (appName: Ptr);                                         {pointer to application name in buffer}
  365.     END;
  366.  
  367. ATPPBPtr = ^ATPParamBlock;
  368. ATPParamBlock = PACKED RECORD
  369.     qLink: QElemPtr;                                            {next queue entry}
  370.     qType: INTEGER;                                             {queue type}
  371.     ioTrap: INTEGER;                                            {routine trap}
  372.     ioCmdAddr: Ptr;                                             {routine address}
  373.     ioCompletion: ProcPtr;                                      {completion routine}
  374.     ioResult: OSErr;                                            {result code}
  375.     userData: LONGINT;                                          {ATP user bytes}
  376.     reqTID: INTEGER;                                            {request transaction ID}
  377.     ioRefNum: INTEGER;                                          {driver reference number}
  378.     csCode: INTEGER;                                            {Call command code automatically set}
  379.     atpSocket: Byte;                                            {currBitMap or socket number}
  380.     CASE MPPParmType OF 
  381.         SendRequestParm, SendResponseParm, GetRequestParm, AddResponseParm, KillSendReqParm:
  382.         (atpFlags: Byte;                                        {control information}
  383.         addrBlock: AddrBlock;                                   {source/dest. socket address}
  384.         reqLength: INTEGER;                                     {request/response length}
  385.         reqPointer: Ptr;                                        {-> request/response data}
  386.         bdsPointer: Ptr;                                        {-> response BDS}
  387.         CASE MPPParmType OF
  388.           SendRequestParm:
  389.             (numOfBuffs: Byte;                                  {number of responses expected}
  390.             timeOutVal: Byte;                                   {timeout interval}
  391.             numOfResps: Byte;                                   {number of responses actually received}
  392.             retryCount: Byte;                                   {number of retries}
  393.             intBuff: INTEGER;                                   {used internally for NSendRequest}
  394.             TRelTime: Byte);                                    {TRelease time for extended send request}
  395.           SendResponseParm:
  396.             (filler0: Byte;                                     {numOfBuffs}
  397.             bdsSize: Byte;                                      {number of BDS elements}
  398.             transID: INTEGER);                                  {transaction ID}
  399.           GetRequestParm:
  400.             (bitMap: Byte;                                      {bit map}
  401.             filler1: Byte);
  402.           AddResponseParm:
  403.             (rspNum: Byte;                                      {sequence number}
  404.             filler2: Byte);
  405.           KillSendReqParm:
  406.             (aKillQEl: Ptr));                                   {ptr to Q element to cancel}
  407.     END;
  408.  
  409. XPPPrmBlkType = (XPPPrmBlk,ASPSizeBlk,ASPAbortPrm,XCallParam);
  410.  
  411. XPPSubPrmType = (ASPOpenPrm,ASPSubPrm);
  412.  
  413. XPPEndPrmType = (AFPLoginPrm,ASPEndPrm);
  414.  
  415. XPPParmBlkPtr = ^XPPParamBlock;
  416. XPPParamBlock = PACKED RECORD
  417.     qLink: QElemPtr;                                            {next queue entry}
  418.     qType: INTEGER;                                             {queue type}
  419.     ioTrap: INTEGER;                                            {routine trap}
  420.     ioCmdAddr: Ptr;                                             {routine address}
  421.     ioCompletion: ProcPtr;                                      {completion routine}
  422.     ioResult: OSErr;                                            {result code}
  423.     cmdResult: LONGINT;                                         {command result (ATP user bytes)}
  424.     ioVRefNum: INTEGER;                                         {volume reference or drive number}
  425.     ioRefNum: INTEGER;                                          {driver reference number}
  426.     csCode: INTEGER;                                            {call command code}
  427.     CASE XPPPrmBlkType OF
  428.       ASPAbortPrm:
  429.         (abortSCBPtr: Ptr);                                     {SCB pointer for AbortOS}
  430.       ASPSizeBlk:
  431.         (aspMaxCmdSize: INTEGER;                                {for SPGetParms}
  432.         aspQuantumSize: INTEGER;                                {for SPGetParms}
  433.         numSesss: INTEGER);                                     {for SPGetParms}
  434.       XPPPrmBlk:
  435.         (sessRefnum: INTEGER;                                   {offset to session refnum}
  436.         aspTimeout: Byte;                                       {timeout for ATP}
  437.         aspRetry: Byte;                                         {retry count for ATP}
  438.         CASE XPPSubPrmType OF
  439.           ASPOpenPrm:
  440.             (serverAddr: AddrBlock;                             {server address block}
  441.             scbPointer: Ptr;                                    {SCB pointer}
  442.             attnRoutine: Ptr);                                  {attention routine pointer}
  443.           ASPSubPrm:
  444.             (cbSize: INTEGER;                                   {command block size}
  445.             cbPtr: Ptr;                                         {command block pointer}
  446.             rbSize: INTEGER;                                    {reply buffer size}
  447.             rbPtr: Ptr;                                         {reply buffer pointer}
  448.             CASE XPPEndPrmType OF
  449.               AFPLoginPrm:
  450.                 (afpAddrBlock: AddrBlock;                       {address block in AFP login}
  451.                 afpSCBPtr: Ptr;                                 {SCB pointer in AFP login}
  452.                 afpAttnRoutine: Ptr);                           {Attn routine pointer in AFP login}
  453.               ASPEndPrm:
  454.                 (wdSize: INTEGER;                               {write data size}
  455.                 wdPtr: Ptr;                                     {write data pointer}
  456.                 ccbStart: ARRAY [0..295] OF Byte)));            {afpWrite max size = 296, else 150}
  457.       XCallParam:
  458.         (xppSubCode: INTEGER;
  459.         xppTimeout: Byte;                                       {retry interval (seconds)}
  460.         xppRetry: Byte;                                         {retry count}
  461.         filler1: INTEGER;                                       {word space for rent.  see the super.}
  462.         zipBuffPtr: Ptr;                                        {pointer to buffer (must be 578 bytes)}
  463.         zipNumZones: INTEGER;                                   {no. of zone names in this response}
  464.         zipLastFlag: Byte;                                      {non-zero if no more zones}
  465.         filler2: Byte;                                          {filler}
  466.         zipInfoField: PACKED ARRAY [1..70] OF Byte);            {on initial call, set first word to zero}
  467.     END;
  468.  
  469.  
  470. FUNCTION OpenXPP(VAR xppRefnum: INTEGER): OSErr;
  471. FUNCTION ASPOpenSession(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  472. FUNCTION ASPCloseSession(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  473. FUNCTION ASPAbortOS(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  474. FUNCTION ASPGetParms(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  475. FUNCTION ASPCloseAll(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  476. FUNCTION ASPUserWrite(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  477. FUNCTION ASPUserCommand(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  478. FUNCTION ASPGetStatus(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  479. FUNCTION AFPCommand(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  480. FUNCTION GetLocalZones(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  481. FUNCTION GetZoneList(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  482. FUNCTION GetMyZone(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  483. FUNCTION PAttachPH(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  484. FUNCTION PDetachPH(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  485. FUNCTION PWriteLAP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  486. FUNCTION POpenSkt(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  487. FUNCTION PCloseSkt(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  488. FUNCTION PWriteDDP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  489. FUNCTION PRegisterName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  490. FUNCTION PLookupName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  491. FUNCTION PConfirmName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  492. FUNCTION PRemoveName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  493. FUNCTION PSetSelfSend(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  494. FUNCTION PKillNBP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  495. FUNCTION PGetAppleTalkInfo(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  496. FUNCTION PATalkClosePrep(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  497. FUNCTION POpenATPSkt(thePBptr: ATPPBPtr;async: BOOLEAN): OSErr;
  498. FUNCTION PCloseATPSkt(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  499. FUNCTION PSendRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  500. FUNCTION PGetRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  501. FUNCTION PSendResponse(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  502. FUNCTION PAddResponse(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  503. FUNCTION PRelTCB(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  504. FUNCTION PRelRspCB(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  505. FUNCTION PNSendRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  506. FUNCTION PKillSendReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  507. FUNCTION PKillGetReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  508. FUNCTION ATPKillAllGetReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  509. PROCEDURE BuildLAPwds(wdsPtr: Ptr;dataPtr: Ptr;destHost: INTEGER;prototype: INTEGER;
  510.     frameLen: INTEGER);
  511. PROCEDURE BuildDDPwds(wdsPtr: Ptr;headerPtr: Ptr;dataPtr: Ptr;netAddr: AddrBlock;
  512.     ddpType: INTEGER;dataLen: INTEGER);
  513. PROCEDURE NBPSetEntity(buffer: Ptr;nbpObject: Str32;nbpType: Str32;nbpZone: Str32);
  514. PROCEDURE NBPSetNTE(ntePtr: Ptr;nbpObject: Str32;nbpType: Str32;nbpZone: Str32;
  515.     socket: INTEGER);
  516. FUNCTION GetBridgeAddress: INTEGER;
  517. FUNCTION BuildBDS(buffPtr: Ptr;bdsPtr: Ptr;buffSize: INTEGER): INTEGER;
  518. FUNCTION MPPOpen: OSErr;
  519. FUNCTION MPPClose: OSErr;
  520. FUNCTION LAPOpenProtocol(theLAPType: ABByte;protoPtr: Ptr): OSErr;
  521. FUNCTION LAPCloseProtocol(theLAPType: ABByte): OSErr;
  522. FUNCTION LAPWrite(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  523. FUNCTION LAPRead(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  524. FUNCTION LAPRdCancel(abRecord: ABRecHandle): OSErr;
  525. FUNCTION LAPAddATQ(theATQEntry: ATQEntryPtr): OSErr;
  526. FUNCTION LAPRmvATQ(theATQEntry: ATQEntryPtr): OSErr;
  527. FUNCTION DDPOpenSocket(VAR theSocket: Byte;sktListener: Ptr): OSErr;
  528. FUNCTION DDPCloseSocket(theSocket: Byte): OSErr;
  529. FUNCTION DDPRead(abRecord: ABRecHandle;retCksumErrs: BOOLEAN;async: BOOLEAN): OSErr;
  530. FUNCTION DDPWrite(abRecord: ABRecHandle;doChecksum: BOOLEAN;async: BOOLEAN): OSErr;
  531. FUNCTION DDPRdCancel(abRecord: ABRecHandle): OSErr;
  532. FUNCTION ATPLoad: OSErr;
  533. FUNCTION ATPUnload: OSErr;
  534. FUNCTION ATPOpenSocket(addrRcvd: AddrBlock;VAR atpSocket: Byte): OSErr;
  535. FUNCTION ATPCloseSocket(atpSocket: Byte): OSErr;
  536. FUNCTION ATPSndRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  537. FUNCTION ATPRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  538. FUNCTION ATPReqCancel(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  539. FUNCTION ATPGetRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  540. FUNCTION ATPSndRsp(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  541. FUNCTION ATPAddRsp(abRecord: ABRecHandle): OSErr;
  542. FUNCTION ATPResponse(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  543. FUNCTION ATPRspCancel(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  544. FUNCTION NBPRegister(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  545. FUNCTION NBPLookup(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  546. FUNCTION NBPExtract(theBuffer: Ptr;numInBuf: INTEGER;whichOne: INTEGER;
  547.     VAR abEntity: EntityName;VAR address: AddrBlock): OSErr;
  548. FUNCTION NBPConfirm(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  549. FUNCTION NBPRemove(abEntity: EntityPtr): OSErr;
  550. FUNCTION NBPLoad: OSErr;
  551. FUNCTION NBPUnload: OSErr;
  552. FUNCTION GetNodeAddress(VAR myNode: INTEGER;VAR myNet: INTEGER): OSErr;
  553. FUNCTION IsMPPOpen: BOOLEAN;
  554. FUNCTION IsATPOpen: BOOLEAN;
  555. PROCEDURE ATEvent(event: LONGINT;infoPtr: Ptr);
  556. FUNCTION ATPreFlightEvent(event: LONGINT;cancel: LONGINT;infoPtr: Ptr): OSErr;
  557.  
  558.  
  559. {$ENDC}    { UsingAppleTalk }
  560.  
  561. {$IFC NOT UsingIncludes}
  562.     END.
  563. {$ENDC}
  564.  
  565.